package app.modules.infrastructure.middleware.redis.facade;

import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

import java.util.Set;

/**
 * @author mh.z
 */
@Component
public class RedisFacadeBean implements RedisFacade {
    private RedisTemplate redisTemplate;

    public RedisFacadeBean(RedisTemplate redisTemplate) {
        this.redisTemplate = redisTemplate;
    }

    @Override
    public <K> Set<K> keys(K pattern) {
        return redisTemplate.keys(pattern);
    }

}
